<?php
include "konek.php";
$ax = date('Y-m').'-01';
$bx = date('Y-m').'-09';
echo $bx;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$xp =mysql_query("SELECT count(*) as A from ticket where close_date between '$ax' and '$bx' and status='Close'");
$xp1 = mysql_fetch_array($xp);
$a = $xp1['A'];
echo $a;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$ax2 = date('Y-m').'-09';
$bx2 = date('Y-m').'-16';
$xp2 =mysql_query("SELECT count(*) as A from ticket where close_date between '$ax2' and '$bx2' and status='Close'");
$xp12 = mysql_fetch_array($xp2);
$b = $xp12['A'];
echo $b;

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$ax3 = date('Y-m').'-16';
echo $ax3."cba aja";
$bx3 = date('Y-m').'-25';
$xp3 =mysql_query("SELECT count(*) as A from ticket where close_date between '$ax3' and '$bx3' and status='Close'");
$xp13 = mysql_fetch_array($xp3);
$c = $xp13['A'];
echo $c;

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$ax4 = date('Y-m').'-25';
$bx4 = date('Y-m').'-31';
$xp4 =mysql_query("SELECT count(*) as A from ticket where close_date between '$ax4' and '$bx4' and status='Close'");
$xp14 = mysql_fetch_array($xp4);
$d = $xp14['A'];
echo $d;
$s = date("Y-m-d");

echo "

<graph caption='Daily Visits' subcaption='(from $s)' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='0' numdivlines='3' numVdivlines='0' yaxisminvalue='10' yaxismaxvalue='80'  rotateNames='1'>
<categories >
<category name='Week 1' />
<category name='Week 2' />
<category name='Week 3' />
<category name='Week 4' />


</categories>


<dataset seriesName='Closed Ticket by Month' color='F1683C' anchorBorderColor='F1683C' anchorBgColor='F1683C'>
	<set value='$a' />
	<set value='$b' />
	<set value='$c' />
	<set value='$d' />
	
</dataset>



</graph>


";
?>